﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/TemplateAdmin.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	adduser
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script src="../../../../Content/admin/js/jquery-1.4.2.js" type="text/javascript"></script>
    <script src="../../../../Content/admin/js/jquery-ui-1.8.2.custom.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
    $(document).ready(function () {
        $('#ContactFormRegistration').validate({
            rules: {
                user_name: {
                    required: true,
                    minlength: 6
                },
                password: {
                    required: true,
                    minlength: 6
                },
                first_name: {
                    required: true,
                    minlength: 6
                },
                last_name: {
                    required: true,
                    minlength: 6
                },
                address: {
                    required: true,
                    minlength: 10
                },
                phone_number: {
                    required: true,
                    minlength: 10,
                    maxlength: 11
                },
                email: {
                    email: true
                },
                gender: {
                    required: true
                },
                DOB: {
                    required: true
                }
            }
        });
        $('.mycalendar').datepicker({
            changeYear: true,
            changeMonth: true,
            dateFormat: 'yy-mm-dd',
            showAnim: 'fold',
            inline: true,
            yearRange: '1950:2011',
            onSelect: function (dateText, inst) {
                //for(var key in inst){
                //alert(key);
                //}
                alert(inst['currentYear'])
                // id, input, selectedDay, selectedMonth, selectedYear, drawMonth, drawYear, inline, currentDay, currentMonth, currentYear, 

                //alert($('.mycalendar').parent().parent().parent().parent().parent().find('.ui-datepicker-year option:selected').val());
            }
        });
    });
</script>

<h3 id="adduser">Add user</h3>
    &nbsp;
    <fieldset id="personal">
    <% using (Html.BeginForm("handadduser", "templateadmin", FormMethod.Post, new { id = "myform" }))
       { %> 
                    <%= ViewData["massage"] != null ? ViewData["massage"] : ""%> 
                        <legend>INFORMATION</legend>
                        <br />
                         <br />
                        <label for="firstname">&nbsp;&nbsp;&nbsp;&nbsp; User name : </label>
                        <input name="user_name" id="username" type="text" tabindex="1" />
                        <br />
                        <br />
                        <label for="password">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Password : </label> 
                        <input name="password" id="lastname" type="password" tabindex="1" />
                        <br />
                         <br />
                        <label for="firstname">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; First name : </label>
                        <input name="first_name" id="firstname" type="text" 
                        tabindex="2" />
                        <br />
                         <br />
                        <label for="firstname">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Last name : </label>
                        <input name="last_name" id="Text2" type="text" 
                        tabindex="2" />
                        <br />
                         <br />
                        <label for="email">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Address : </label>
                        <input name="address" id="email" type="text" 
                        tabindex="2" />
                        <br />
                         <br />
                        <label for="pass">Phone Number : </label>
                        <input name="phone_number" id="pass" type="text" 
                        tabindex="2" />
                        <br />
                         <br />
                        <label for="pass-2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Email : </label>
                        <input name="email" id="pass-2" type="text" 
                        tabindex="2" />
                        <br />
                         <br />
                        <p><label for="CONTROLGROUPREGISTERVIEW_PersonInputRegisterView_DropDownListGender" id="gender">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; *Gender:</label><select name="gender"><option selected="" >Select your gender</option></p>
                <option value="1">Male</option>
                <option value="2">Female</option></select>
                        
                        <br />
                         <br />
                        <label for="pass-2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DOB : </label>
                        <input type="text" class="mycalendar" value="To calendar" name="DOB"  />   
                       
                        <br />
                         <br />
                        <label for="pass-2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Right : </label>
                        <input name="rights" id="Password3" type="text" 
                        tabindex="2" />
                        <br />
                      </fieldset>
                      <div align="center">
                      <input id="button1" type="submit" value="Send" /> 
                      <input id="button2" type="reset" />
                      </div>
                      <% } %>

</asp:Content>
